package com.yingxue.lesson;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

//@ServletComponentScan("com.yingxue.lesson.config")
@SpringBootApplication
@MapperScan("com.yingxue.lesson.mapper")
public class TravelFrameApplication {

    public static void main(String[] args) {
        SpringApplication.run(TravelFrameApplication.class, args);
    }


//    /**
//     * 注册 处理跨域问题 过滤器
//     */
//    @Bean
//    public CrossOriginFilter crossOriginFilter(){
//        return new CrossOriginFilter();
//    }
//
//
//    @Bean
//    public FilterRegistrationBean filterRegistrationBean(){
//        FilterRegistrationBean<Filter> filterRegistrationBean = new FilterRegistrationBean<>();
//        //设置过滤器
//        filterRegistrationBean.setFilter(crossOriginFilter());
//        //设置拦截路径
//        filterRegistrationBean.addUrlPatterns("/api/*");
//        //设置名称
//        filterRegistrationBean.setName("CrossOriginFilter");
//        return filterRegistrationBean;
//    }

}
